package com.fowo.api.model.wfsaddress;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** WFS地址 导入导出辅助模型 */
@Getter
@Setter
public class WFSAddressExcelPo {

  @Size(max = 50, message = "平台长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "平台")
  private String platform;

  @Size(max = 50, message = "店铺长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "店铺")
  private String shopIdShopName;

  @ExcelIgnore
  @ExcelProperty(value = "店铺")
  private Long shopId;

  @Size(max = 50, message = "国家长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "国家")
  private String country;

  @NotBlank(message = "地址别名不能为空")
  @Size(max = 50, message = "地址别名长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*地址别名")
  private String alias;

  @Size(max = 50, message = "发货国家/地区长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "发货国家/地区")
  private String fromCountryCountry;

  @ExcelIgnore
  @ExcelProperty(value = "发货国家/地区")
  private Long fromCountry;

  @Size(max = 50, message = "发货方名称长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "发货方名称")
  private String fromName;

  @Size(max = 50, message = "街道地址1长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "街道地址1")
  private String streetDetail;

  @Size(max = 50, message = "街道地址2长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "街道地址2")
  private String streetDetail2;

  @Size(max = 50, message = "城市长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "城市")
  private String city;

  @Size(max = 50, message = "区长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "区")
  private String county;

  @Size(max = 50, message = "州/省/地区长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "州/省/地区")
  private String area;

  @Size(max = 50, message = "邮政编码长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "邮政编码")
  private String postalCode;

  @Size(max = 50, message = "电话号码长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "电话号码")
  private String phoneNumber;

  @Size(max = 50, message = "默认地址长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "默认地址")
  private String defaultAddress;

  @EnumsString(
    value = { "发货地址", "退货地址" },
    message = "类型的可用值为 “发货地址”, “退货地址” 其中之一"
  )
  @Size(max = 50, message = "类型长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "类型")
  private String type;

  @Size(max = 50, message = "收货地址国家/地区长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "收货地址国家/地区")
  private String takeDeliveryCountryCountry;

  @ExcelIgnore
  @ExcelProperty(value = "收货地址国家/地区")
  private Long takeDeliveryCountry;

  @Size(max = 50, message = "收货方名称长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "收货方名称")
  private String takeDeliveryName;
}
